package com.seuic.hnjiningposapp.hnapps.util;

/**
 * 处理金额小数点
 */
public class MoneyUtils {
    public static String packRequest(String moneys) {
        String money = "";
        String f3 = "";
        if (moneys.indexOf(".") != -1) {

            String moneylengs[] = moneys.split("\\.");
            if (moneylengs[1].length() == 2) {
                f3 = moneylengs[0] + "." + moneylengs[1];
            } else {
                f3 = moneys + "0";
            }
        } else {
            money = moneys;
            f3 = money + ".00";
        }
        return f3;
    }
}
